// v1.0.0
(function(){function g(){if(null==e){e={};for(var a=document.cookie.split(";"),b=0,c=a.length;b<c;++b){var d=a[b].split("=");if(d[0]){var f=decodeURIComponent(d[0].replace(/(^\s+|\s+$)/g,""));0!=f.length&&(d=d[1]?decodeURIComponent(d[1].replace(/(^\s+|\s+$)/g,"")):null,e[f]=d)}}setTimeout(function(){e=null},1E3)}}function h(a){var b,c,d=a.indexOf("/");if(0<=d){var e=a.lastIndexOf("/");c=a.substring(0,d);b=a.substring(d,e);a=a.substr(e+1);b||(b="/")}a={name:a};b&&(a.path=b);c&&(a.domain=c);return a}
function i(a){a||(a=31536E6);if("number"==typeof a)return 0>a?null:(new Date((new Date).getTime()+1E3*a)).toUTCString();var b=/(?:([0-9]+):)?([0-9]+):([0-9]+)(?:\.([0-9]+))?/.exec(a);if(b){var a=b[1]?parseInt(b[1]):0,c=b[2]?parseInt(b[2]):0,d=b[3]?parseInt(b[3]):0,b=b[4]?parseInt(b[4]):0;return(new Date((new Date).getTime()+(1E3*(60*(60*a+c)+d)+b))).toUTCString()}return Date.parse(a).toUTCString()}var e=null;$cookie=function(a,b,c){if(1>=arguments.length)return g(),e[a];var d=h(a),c=i(c);document.cookie=
encodeURIComponent(d.name)+"="+encodeURIComponent(b)+(c?"; expires="+c:"")+(d.path?"; path="+d.path:"")+(d.domain?"; domain="+d.domain:"");e&&(e[d.name]=b)};$cookie.get=function(a){g();for(var b={},c=0,d=arguments.length;c<d;++c){var f=arguments[c];b[f]=e[f]}return b};$cookie.set=function(a,b){for(var c in a)$cookie(c,a[c],b)};$cookie.has=function(a){g();return a in e};$cookie.remove=function(a){a=h(a);document.cookie=encodeURIComponent(a.name)+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT"+(a.path?"; path="+
a.path:"")+(a.domain?"; domain="+a.domain:"");e&&delete e[a.name]};$cookie.$each=function(a,b){g();if("string"==typeof a)return(new Function("c","a","for (var n in c){if(!n)continue;var v=c[n];if(("+js.from.Lambda.replace(a,"v","n","a")+")===false)return false;}"))(e,b);for(var c in e)if(c&&!1===a(e[c],c,b))return!1};$cookie.clear=function(){var a=this;this.$each(function(b,c){a.remove(c)})};$session=function(a,b){$cookie(a,b,-1)};$session.set=function(a){for(var b in a)$cookie(b,a[b],-1)}})();
